package com.yuanfeng.job.feign;

import com.yuanfeng.commoms.dto.order.WapGoodsSaleSumDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @ClassName GoodsServiceClient
 * @Description
 * @Author hyq
 * @Date 2023/9/5 9:20
 * @Version 1.0
 **/
@FeignClient(name = "mall-goods", url = "http://localhost:8083")
public interface GoodsServiceClient {

    /**
     * 修改商品库存
     *
     * @param wapGood
     * @return
     */
    @PostMapping("/goods/common/update/goodsStock")
    ResponseResult updateGoodsStock(@RequestBody List<WapGoodsSaleSumDTO> wapGood);

    /**
     * 导入商品数据
     *
     * @return
     */
    @GetMapping("/es/importGoodsData")
    ResponseResult importData();


    /**
     * 导入店铺信息
     *
     * @return
     */
    @GetMapping("/es/importShopData")
    ResponseResult importShopData();
}
